package me.zhengjie.modules.website.repository;

import me.zhengjie.modules.website.domain.UserColumn;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * @author system
 * @since 2024-12-10 22:32:50
 *
 */
@Repository
public interface UserColumnRepository extends JpaRepository<UserColumn, Long>, JpaSpecificationExecutor<UserColumn> {

    /**
     * 根据角色ID删除所有数据
     *
     * @param roleId 角色ID
     */
    void deleteByRoleId(Long roleId);

    /**
     * 根据栏目id删除关联关系
     * @param columnId 栏目id
     */
    void deleteByColumnId(Long columnId);

}
